using System;
using System.Collections.Generic;
using System.Text;

namespace IGlobalist.Cms.Model
{
    [Serializable]
    public class Page: BaseCmsContainer, IPage
    {

        #region IPage Members
 
        private PageMenuDisplay _Display = PageMenuDisplay.MainMenu;
        public PageMenuDisplay Display
        {
            get
            {
                return _Display;
            }
            set
            {
                _Display = value;
            }
        }

        public bool Inherit
        {
            get
            {
                return Convert.ToBoolean(GetExtPropertyValue("Inherit"));
            }
            set
            {
                SetExtPropertyValue("Inherit", value);

            }
        }

        public long TemplateID
        {
            get
            {
                return Convert.ToInt64(GetExtPropertyValue("TemplateID"));
            }
            set
            {
                SetExtPropertyValue("TemplateID", value);

            }
        }

        

        private PageList _SubPageList = new PageList();
        public PageList SubPageList
        {
            get
            {
                return _SubPageList;
            }
            set
            {
                _SubPageList = value;
            }
        }
        private bool _IsActive = false;
        public bool IsActive
        {
            get
            {
                return _IsActive;
            }
            set
            {
                _IsActive = value;
            }
        }

        private bool _IsCurrentPage = false;
        public bool IsCurrentPage
        {
            get
            {
                return _IsCurrentPage;
            }
            set
            {
                _IsCurrentPage = value;
            }
        }

        public bool Hidden 
        {
            get
            {
                return Convert.ToBoolean(GetExtPropertyValue("Hidden"));
            }
            set
            {
                SetExtPropertyValue("Hidden", value);

            }
        }

        public short Type
        {
            get
            {
                return Convert.ToInt16(GetExtPropertyValue("Type"));
            }
            set
            {
                this.SetExtPropertyValue("Type", value);
            }
        }

        public short PageType
        {
            get
            {
                return Convert.ToInt16(GetExtPropertyValue("PageType"));
            }
            set
            {
                this.SetExtPropertyValue("PageType", value);
            }
        }

        public string KeyWords
        {
            get
            {
                return Convert.ToString(GetExtPropertyValue("KeyWords"));
            }
            set
            {
                this.SetExtPropertyValue("KeyWords", value);
            }
        }

        #endregion

        #region IXml Members

        public bool FromXml(string xml)
        {
            throw new Exception("The method or operation is not implemented.");
        }

        public string ToXmlString()
        {
            throw new Exception("The method or operation is not implemented.");
        }

        #endregion

        #region ICmsObject Members


        public bool FromCmsObject(ICmsObject obj)
        {
            bool result=base.FromCmsObject(obj);
           
            return result;
        }

              #endregion


        #region IPage Members


        

        #endregion
    }
}
